package com.atom.dbflow

import com.raizlabs.android.dbflow.annotation.Column
import com.raizlabs.android.dbflow.annotation.PrimaryKey
import com.raizlabs.android.dbflow.annotation.Table
import com.raizlabs.android.dbflow.structure.BaseModel
import java.util.*


internal abstract class AbstractBaseEntity : BaseModel , BaseEntity {

    @Column
    @PrimaryKey
    override var id: String = UUID.randomUUID().toString()

    @Column(length = 32)
    override var createAt: Date = Date()

    @Column(length = 32)
    override var updateAt: Date? = null

    @Column(length = 32)
    var name: String? = null

    constructor() : super()

    override fun toString(): String {
        return "AbstractBaseEntity(id='$id', createAt=$createAt, updateAt=$updateAt, name=$name)"
    }
}